#VRML_SIM R2023b utf8

PROTO DepthBot [
  field SFVec3f    translation  0 0 0
  field SFRotation rotation     0 0 1 0
  field SFFloat    bodyMass     1
]
{
  Robot {
    translation IS translation
    rotation IS rotation
    children [
      DEF BODY Shape {
        appearance PBRAppearance {
          baseColor 0.917647 0.145098 0.145098
          roughness 1
          metalness 0
        }
        geometry Box {
          size 0.2 0.1 0.05
        }
      }
      DEF WHEEL1 HingeJoint {
        jointParameters HingeJointParameters {
          axis 0 1 0
          anchor 0.05 0.06 0
        }
        device [
          RotationalMotor {
            name "wheel_motor_1"
          }
        ]
        endPoint Solid {
          translation 0.05 0.06 0
          rotation 1 0 0 1.5708
          children [
            DEF WHEEL Shape {
              appearance PBRAppearance {
                baseColor 0.305882 0.898039 0.25098
                roughness 1
                metalness 0
              }
              geometry Cylinder {
                height 0.02
                radius 0.04
                subdivision 24
              }
            }
          ]
          name "whee_solid_1"
          boundingObject USE WHEEL
          physics Physics {
          }
        }
      }
      DEF WHEEL2 HingeJoint {
        jointParameters HingeJointParameters {
          axis 0 1 0
          anchor 0.05 -0.06 0
        }
        device [
          RotationalMotor {
            name "wheel_motor_2"
          }
        ]
        endPoint Solid {
          translation 0.05 -0.06 0
          rotation 1 0 0 1.5708
          children [
            USE WHEEL
          ]
          name "wheel_solid_2"
          boundingObject USE WHEEL
          physics Physics {
          }
        }
      }
      DEF WHEEL3 HingeJoint {
        jointParameters HingeJointParameters {
          axis 0 1 0
          anchor -0.05 0.06 0
        }
        device [
          RotationalMotor {
            name "wheel_motor_3"
          }
        ]
        endPoint Solid {
          translation -0.05 0.06 0
          rotation 1 0 0 1.5708
          children [
            USE WHEEL
          ]
          name "wheel_solid_3"
          boundingObject USE WHEEL
          physics Physics {
          }
        }
      }
      DEF WHEEL4 HingeJoint {
        jointParameters HingeJointParameters {
          axis 0 1 0
          anchor -0.05 -0.06 0
        }
        device [
          RotationalMotor {
            name "wheel_motor_4"
          }
        ]
        endPoint Solid {
          translation -0.05 -0.06 0
          rotation 1 0 0 1.5708
          children [
            USE WHEEL
          ]
          name "whee_solid_4"
          boundingObject USE WHEEL
          physics Physics {
          }
        }
      }
      Camera {
        translation 0.1 0.0 0.035
        children [
          Transform {
            translation -0.015 0 0
            rotation -0.5771968951617173 -0.577656895078166 -0.5771968951617173 -2.093935
            children [
              Shape {
                appearance PBRAppearance {
                  roughness 1
                  metalness 0
                }
                geometry Cylinder {
                  height 0.03
                  radius 0.01
                }
              }
            ]
          }
        ]
        name "camera_top"
        fieldOfView 1.047
        width 640
        height 480
        antiAliasing TRUE
        noise 0.02
        near 0.01
        far 0.0
      }  
      Display {
        name "depth_view"
        width 518
        height 518
      }  
    ]
    boundingObject USE BODY
    physics Physics {
      density -1
      mass IS bodyMass
    }
    controller "depth_viewer"
  }
}
